package java69.work721;
//长方形
public class Rectaangle extends Base {
    private double bottom;
    private double high;

    public Rectaangle() {
    }

    public Rectaangle(double bottom, double high) {
        this.bottom = bottom;
        this.high = high;
    }

    public double getBottom() {
        return bottom;
    }

    public void setBottom(double bottom) {
        this.bottom = bottom;
    }

    public double getHigh() {
        return high;
    }

    public void setHigh(double high) {
        this.high = high;
    }

    @Override
    public void area( ) {
        double areas = (this.bottom*this.high)/2;
        System.out.println("面积为"+areas);
    }

    @Override
    public void perimeter() {
        double perimeter = (this.bottom+this.high)*2;
        System.out.println("周长为"+perimeter);
    }
}
